//
//  DataBaseSingleng.h
//  UI_豆瓣
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ActivitesList.h"
#import "Movie.h"
#import "User.h"
@interface DataBaseSingleng : NSObject

+(instancetype)shareDataBase;
//打开数据库
-(void)openDB;


#pragma mark - 创建一个活动表
- (void)createActivityListTable;

#pragma mark - 插入一个活动
- (void)insertActivityListSQL:(ActivitesList *)activity;


#pragma mark - 查询活动
- (NSMutableArray *)selectActivity;

#pragma mark - 删除活动表
-(void)dropTable;





#pragma mark - 创建电影表
- (void)createMovieTable;

#pragma mark - 插入一个电影
- (void)insertMovie:(Movie *)movie;

#pragma mark - 查询电影
- (NSMutableArray *)selectMovie;

#pragma mark - 删除电影表
- (void)deleteMovieTable;




#pragma mark -- 创建用户表
-(void)createUserTable;

#pragma mark -- 插入用户
-(void)insertUser:(User *)user;

#pragma mark -- 查询用户
-(NSMutableArray *)selectUser;



#pragma mark -- 创建我的活动表
-(void)createMyActivityTable;

#pragma mark -- 收藏活动
-(void)insertMyActivity:(NSString *)activity :(NSString *)name;

#pragma mark -- 查询我的活动
-(NSMutableArray *)selectMyActvity:(NSString *)userName;

#pragma mark - 按标题名查讯活动
- (NSMutableArray *)selectActivity:(NSString *)title;

#pragma mark - 删除我的活动收藏表
- (void)deleteMyActivityTable:(NSString *)title name:(NSString *)name;

@end
